import React, { Component } from 'react';
import styles from './index.less';
import { Modal } from 'antd';
import Exportcontent from './Exportcontent';
import Cardinformation from './Cardinformation';
import Notecontent from './Notecontent';
export default class Modales extends Component {
    handleCancel = () => {
        this.props.onCancel();
    }
    handleOk = () => {
    }
    render() {
        const { visible, type, idcard, facecard } = this.props;
        const Titlecontent = (
            <div>
                {
                    (() => {
                        switch (type) {
                            case 'export':
                                return '导出数据';
                            case 'certificate':
                                return '身份信息';
                            case 'note':
                                return '新增备注';
                            default:
                                break;
                        }
                    })()
                }
            </div>
        )
        return (
            <Modal
                title={Titlecontent}
                新增渠道
                className={styles.modal_wrap}
                maskClosable={false}
                destroyOnClose={true}
            >
                {
                    (() => {
                        switch (type) {
                            case 'export':
                                return <Exportcontent handleCancel={this.handleCancel} />;
                            case 'certificate':
                                return <Cardinformation idcard={idcard} facecard={facecard} />;
                            case 'note':
                                return <Notecontent handleCancel={this.handleCancel} />;
                            default:
                                return null;
                        }
                    })()
                }
            </Modal>
        )
    }
}
